<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
	<title>学生选课系统登录</title>
	<meta content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap3/css/bootstrap.min.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/login.css">
	<script src="${pageContext.request.contextPath}/bootstrap3/js/bootstrap.min.js"></script>
	<script type = "text/javascript"></script>

	<style>
		body{
			background-size: cover;
			background: url("/images/bg.c7208006.jpg") no-repeat fixed;
		}
	</style>
</head>

<div class="row">
	<div class="col-md-4">
		<div class="center1">
			<h1 style="color: black">
				校园选课系统
			</h1>
		</div>
	</div>
	<div class="col-md-8">

		<div class="center">

			<div class="loginForm" >
				<div>
					<form id=adminlogin  method=post name=adminlogin action="user?action=login"  >
						<div style="margin-top: 50px">
							<label for="userName" class="form-label">用户名:</label>
							<input type="text" class="form-control" id="userName" value="${user.userName }" name="userName" placeholder="请输入用户名/姓名">
						</div>
						<div style="margin-top: 50px">
							<label for="password" class="form-label">密码:</label>
							<input type="password" class="form-control" id="password" value="${user.password }" name="password" placeholder="请输入密码" >
						</div>
						<div style="margin-top: 50px">
							<label for="userType" class="form-label">用户类型:</label>
							<select id="userType" name="userType" class="form-select">
								<option value="none" selected disabled hidden>请选择</option>
								<option value="学生" ${'学生'==user.userType?'selected':'' }>学生</option>
								<option value="管理员" ${'管理员'==user.userType?'selected':'' }>管理员</option>
							</select>
						</div>
						<div class="button" style="margin-top: 20px" onclick="javascript:adminlogin.submit();">
							<button id="login" type="submit" class="btn btn-primary">登录</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script type=text/javascript>
	if('${error}'!=''){
		alert('${error}');
	}
</script>